const soap = require('soap');
const http = require('http');
const xml = require('fs').readFileSync('myservice.wsdl', 'utf8');

//http server example
const server = http.createServer(function (request, response) {
	response.end('404: Not Found: ' + request.url);
});

const myService = {
	MyService: {
		MyPort: {
			sayHello: function (args) {
				return {
					name: args.name
				};
			}

		}
	}
};

server.listen(8080);
console.log(xml);
soap.listen(server, '/wsdl', myService, xml);
